Step 3 — Sign Payload
Sign the payload returned by Step 2.
Option A — Wallet Signing (EVM)
const signature = await ethereum.request({
method: 'personal_sign',
params: [JSON.stringify(payload), walletAddress],
});
You can also sign evm_raw_payload if your wallet flow expects a preformatted message.
Option B — Backend Signing
- Select the correct raw payload (
evm_raw_payloadorcosmos_raw_payload). - Sign with your backend-managed key.
- Return
signatureandpub_key.
tip
For programmatic/private-key signing, sign the chain-specific raw payload directly (evm_raw_payload or cosmos_raw_payload), not a re-serialized payload object.
Output Needed For Step 4
signaturepub_keywallet_address- plus Step 2 values:
payload,types, and optionalmeta
Next: Broadcast